class Project {
  String? pjname;
  DateTime? startTime;
  DateTime? endTime;
  DateTime? createTime;
  int? status;
  String? target;
  String? projNo;
  String? creater;

  Project(
      {this.pjname,
      this.startTime,
      this.endTime,
      this.createTime,
      this.status,
      this.target,
      this.projNo,
      this.creater});

  Project.fromJson(Map<String, dynamic> json) {
    if (json["pjname"] is String) {
      pjname = json["pjname"];
    }
    if (json["startTime"] is String) {
      startTime = DateTime.parse(json["startTime"]);
    }
    if (json["endTime"] is String) {
      endTime = DateTime.parse(json["startTime"]);
    }
    if (json["createTime"] is String) {
      createTime = DateTime.parse(json["createTime"]);
    }
    if (json["status"] is int) {
      status = json["status"];
    }
    if (json["target"] is String) {
      target = json["target"];
    }
    if (json["projNo"] is String) {
      projNo = json["projNo"];
    }
    if (json["creater"] is String) {
      creater = json["creater"];
    }
  }

  static List<Project> fromList(List<Map<String, dynamic>> list) {
    return list.map(Project.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["pjname"] = pjname;
    _data["startTime"] = startTime;
    _data["endTime"] = endTime;
    _data["createTime"] = createTime;
    _data["status"] = status;
    _data["target"] = target;
    _data["projNo"] = projNo;
    _data["creater"] = creater;
    return _data;
  }
}
